#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int hour = 0;
    int minute = 0;
    int k = 0;
    scanf("%d:%d %d", &hour, &minute, &k);
    hour = ((minute + k) / 60 + hour) % 24;
    minute = (minute + k) % 60;
    printf("%02d:%02d\n", hour, minute);
    return 0;
}

int main() {
    double s = 0;
    int r = 0;
    scanf("%d", &r);
    s = 4 / 3.0 * 3.14 * r * r * r;
    printf("%.2lf\n", s);
    return 0;
}
int main() {
    int a = 0;
    int b = 0;
    int c = 0;
    scanf("%d %d", &a, &b);
    c = (b - a) + b;
    printf("%d\n", c);
    return 0;
}

int main() {
    int h = 0;
    int r = 0;
    double s = 0;
    double sun = 10000;
    int d = 0;
    scanf("%d %d", &h, &r);
    s = 3.14 * h * r * r;
    while (sun > 0)
    {
        sun = sun - s;
        d++;
    }
    printf("%d", d);
    return 0;
}
int main() {
    double r1 = 0;
    double r2 = 0;
    scanf("%lf %lf", &r1, &r2);
    printf("%.1f\n", (r1 * r2) / (r1 + r2));
    return 0;
}
int main() {
    int r = 0;
    double b = 3.14;
    scanf("%d", &r);
    printf("%lf", b * (r * r));
    return 0;
}
int main() {
    double f = 0;
    double c = 0;
    scanf("%lf", &f);
    c = 5.0 / 9 * (f - 32);
    printf("%.3lf\n", c);
    return 0;
}

int main() {
    int n = 0;
    int h = 0;
    int m = 0;
    int s = 0;
    int t = 0;
    while (scanf("%d %d %d", &n, &h, &m) == 3)
    {
        if (m % h != 0)
        {
            t = m / h + 1;
        }
        else
        {
            t = m / h;
        }
        s = n - t;
    }
    printf("%d\n", s);
    return 0;
}
